package cardGame;

import static org.junit.Assert.*;
import junit.framework.TestCase;

import org.junit.Test;

public class HoyleDeckTest extends TestCase{

	@Test
	public void testShuffleRandomness() {
		
		Card[] dealt = new Card[3000];
		for (int i = 0; i < dealt.length - 1; ){
		HoyleDeck a = new HoyleDeck();
		a.shuffle();
		dealt[i] = a.deal(1);
		System.out.println(dealt[i].getFaceValue() + " of " + dealt[i].getSuit() + "S\n" + ++i + "\n");
		}
		for (int i = 0; i < dealt.length - 2; i++){
		if (dealt[i].equals(dealt[i+1])){
			System.out.println("Failure Alert Notice:\n" + dealt[i].getFaceValue() + " of " + dealt[i].getSuit() + "S\n" + dealt[i+1].getFaceValue() + " of " + dealt[i+1].getSuit() + "S\n");
			System.out.println("i3 is: " + dealt[i+2].getFaceValue() + " of " + dealt[i+2].getSuit() + "S\n");
			if ((dealt[i].equals(dealt[i+2])) && (dealt[i+1].equals(dealt[i+2]))){
				fail();
			}
			else {}
		}
		}
		
	}
	
//	@Test
//	public void testShufflePlacing() {
//		HoyleDeck b = new HoyleDeck();
//		b.shuffle();
//		Card[] dealt = new Card[52];
//		for (int i = 0; i < b.getNumCards(); i++){
//		dealt[i] = b.deal(1);
//		System.out.println(dealt[i].getFaceValue() + " of " + dealt[i].getSuit() + "S\n");
//		}
//		
//	}

}
